<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #box{
            width: 220px;
            height: 260px;
            margin: 50px;
            background-color: #c81622;
            color: white;
        }
        h3{
            height: 40px;
            line-height: 40px;
            padding-left: 10px;
            background-color: #b3191b;
        }
        li{
            line-height: 35px;
            padding-left: 10px;
        }
        span{
            float: right;
            margin-right: 12px;
        }
    </style>
</head>
<body>
    <div id="box">
        <h3>全部商品分类</h3>
        <ul>
            <li v-for="(item,index) in arr">
                {{item.name}}
                <span><img src="./imags/bg.png" alt=""></span>
            </li>
        </ul>
    </div>
    <script src="js/vue.js"></script>
    <script>
        let vm = new Vue({
            el:"#box",
            data:{
                arr:[
                    {name:"家用电器"},
                    {name:"手机 数码 相机"},
                    {name:"电脑 办公"},
                    {name:"家居 家具 家装"},
                    {name:"男装 女装 珠宝"},
                    {name:"鞋靴 箱包 钟表"}
                ]
            }
        })
    </script>
</body>
</html>